using PandaWebAPI.Models.ef;

namespace PandaWebAPI.Services;

/// <summary>
/// 购物车服务接口
/// </summary>
public interface IShoppingCartService
{
    /// <summary>
    /// 获取所有购物车
    /// </summary>
    Task<IEnumerable<ShoppingCart>> GetAllAsync();

    /// <summary>
    /// 根据ID获取购物车
    /// </summary>
    Task<ShoppingCart?> GetByIdAsync(Guid id);

    /// <summary>
    /// 根据用户ID获取购物车
    /// </summary>
    Task<ShoppingCart?> GetByUserIdAsync(Guid userId);

    /// <summary>
    /// 创建购物车
    /// </summary>
    Task<ShoppingCart> CreateAsync(ShoppingCart shoppingCart);

    /// <summary>
    /// 更新购物车
    /// </summary>
    Task<ShoppingCart> UpdateAsync(ShoppingCart shoppingCart);

    /// <summary>
    /// 删除购物车
    /// </summary>
    Task DeleteAsync(Guid id);

    /// <summary>
    /// 清空购物车
    /// </summary>
    Task ClearCartAsync(Guid cartId);
} 